package main

import (
	"../../backend"
	"fmt"
)

func main() {
	c := newTestConn()
	defer c.Close()

	if err := c.Ping(); err != nil {
		fmt.Println("failed connect!")
	} else {
		fmt.Println("success connect!")
	}
}

func newTestConn() *backend.Conn {
	c := new(backend.Conn)

	if err := c.Connect("127.0.0.1:3306", "mysqlsync", "mysqlsync123", ""); err != nil {
		panic(err)
	}

	return c
}
